﻿using System;
using System.Runtime.Serialization;

using SharedGenomics.Core;

namespace SharedGenomics.Domain
{
    [Obsolete("Use ParameterFilterSetInfo instead")]
    [DataContract]
    public class FilterParameters
    {
        //public static FilterParameters FromFilterSet(FilterSet filterSet, FileSchema schema)
        //{
        //    filterSet.ThrowIfNull("filterSet");
        //    schema.ThrowIfNull("schema");

        //    string phenotypeColumnName = filterSet.Phenotype;
        //    int phenotypeIndex = phenotypeColumnName == null
        //        ? -1
        //        : schema.GetColumnPhenotypeIndex(filterSet.Phenotype);

        //    FilterParameters @params = new FilterParameters()
        //    {
        //        Mind = (double?)filterSet.IndividualMissingnessRate,
        //        Geno = (double?)filterSet.SnpGenotypingRate,
        //        MAF = (double?)filterSet.MAF,
        //        HWE1 = (double?)filterSet.HardyWeinbergP,
        //        PhenotypeIndex = phenotypeIndex
        //    };

        //    return @params;
        //}

        [DataMember]
        public double? Mind { get; set; }

        [DataMember]
        public double? Geno { get; set; }

        [DataMember]
        public double? MAF { get; set; }

        [DataMember]
        public double? HWE1 { get; set; }

        [DataMember]
        public double? HWE2 { get; set; }

        [DataMember]
        public int PhenotypeIndex { get; set; }
    }
}
